Playing
the AVI File
Before using
the mciSendCommand
DWORD PlayMovie(WORD wDevID, DWORD dwFrom, DWORD
dwTo)
{
MCI_DGV_PLAY_PARMS mciPlay; //
play parameters
DWORD
dwFlags = 0;
// Check
dwFrom. If it is != 0 then set parameters and flags.
if
(dwFrom){
mciPlay.dwFrom = dwFrom; // set parameter
dwFlags |= MCI_FROM; // set
flag to validate member
}
// Check
dwTo. If it is != 0 then set parameters and flags.
if (dwTo){
mciPlay.dwTo = dwTo; // set
parameter
dwFlags |= MCI_TO; // set
flag to validate member
}
// Send
the MCI_PLAY command and return the result.
return
mciSendCommand(wDevID, MCI_PLAY, dwFlags,
(DWORD)(LPVOID)&mciPlay);
}